<div class="animated" ng-class="{true: 'fadeInRight', false:'fadeInLeft'}[currentAnimated]">
  <div class="row search-area">
    <div class="col-xs-6 col-md-6">
      <div class="btn-group" role="group">
        <a ui-sref=".add" class="btn btn-default" title="新增"><i class="fa fa-plus-square rotate180"></i><span class="hidden-xs">新增</span></a>
        <a ng-click="remove()" class="btn btn-default" title="删除"><i class="fa fa-trash"></i><span class="hidden-xs">删除</span></a>
      </div>
    </div>

    <div class="col-xs-6 col-md-6">
      <form class="form-inline pull-right">
        <div class="input-group" >
          <input type="text" class="form-control" name="name" placeholder="商品名称" ng-model="channelGoods.name">
          <span class="input-group-btn">
            <button class="btn btn-primary" type="button" ng-click="search()"><i class="fa fa-search"></i><span class="hidden-xs hidden-sm">搜索</span></button>
          </span>
        </div>
        <a class="btn btn-default" data-toggle="modal" data-backdrop="static" data-target="#advancedSearch"><i class="fa fa-filter"></i><span class="hidden-xs hidden-sm">高级搜索</span></a>
      </form>
    </div>
  </div>
  
  <div class="row">
    <div class="col-xs-12 col-md-12">
      <div ui-grid="gridOptions" ui-grid-selection ui-grid-pagination ui-grid-resize-columns ui-grid-move-columns class="grid"></div>
    </div>
  </div>
</div>

<div class="modal" id="advancedSearch" tabindex="-1" role="dialog" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
       <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
          <h4 class="modal-title">高级搜索</h4>
       </div>
       <div class="modal-body">
        <div class="row">
          <form class="form-horizontal searchForm" role="form" name="modelForm" >
            <div class="col-xs-6 col-md-6">
              <div class="form-group">
                <label class="control-label hidden-xs hidden-sm col-md-3">商品名称：</label>
                <div class="col-xs-12 col-md-9">
                  <input type="text" class="form-control" name="name" placeholder="商品名称" ng-model="channelGoods.name">
                </div>
              </div>
            </div>
          </form>
        </div>    
       </div>
       <div class="modal-footer">
          <button type="button" class="btn btn-primary" ng-click="search()" data-dismiss="modal">搜索</button>
          <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
       </div>
    </div>
  </div>
</div>

<script type="text/javascript">
$('#advancedSearch').on('shown.bs.modal', function () {
  $(".modal-backdrop").css({"position": "static"});
}).on('hidden.bs.modal', function(){
  $(".modal-backdrop").css({"position" : "fixed"});
});
</script>